package com.contactsconverter.utils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.contactsconverter.activity.CTSynchroniserActivity;
import com.contactsconverter.component.CTEventBroadcastReceiver;
import com.contactsconverter.model.CTContactModel;
import com.contactsconverter.model.CTNumberModel;
import com.contactsconverter.service.AutoSynchroniseService;
import com.contactsconverter.service.CTSynchroniseService;
import com.contactsconverter.R;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.os.AsyncTask;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;

public class CamtelUtil {

	public static HashMap<String, String> camtelFromMap = new HashMap<String, String>();
	public static  HashMap<String, String> camtelToMap = new HashMap<String, String>();
	public static  HashMap<String, String> camtelNewMap = new HashMap<String, String>();
	
	public static  HashMap<String, String> camtelRollBackMap = new HashMap<String, String>();
	
	
	public static  HashMap<String, String> camtelMobileMap = new HashMap<String, String>();
	public static List<String> keys = Arrays.asList("2220","2221","2222","2223","2224","2225","2226","2227","2228","2229","2230","2231","2232","2298","2299","3332","3333","3334","3335","3336","3337","3339","3340","3341","3342","3343","3344","3345","3346","3347","3348","3349","3398","3399");
	
	static{
		
		camtelMobileMap.put("22", "242");
		camtelMobileMap.put("33", "243");
		
		camtelFromMap.put("22200","0000");
		camtelFromMap.put("22210","0000");
		camtelFromMap.put("22220","0000");
		camtelFromMap.put("22230","0000");
		camtelFromMap.put("22240","1000");
		camtelFromMap.put("22241","5000");
		camtelFromMap.put("22250","0000");
		camtelFromMap.put("22251","0000");
		camtelFromMap.put("22252","7000");
		camtelFromMap.put("22253","9000");
		camtelFromMap.put("22260","1000");
		camtelFromMap.put("22261","2000");
		camtelFromMap.put("22262","5000");
		camtelFromMap.put("22270","1000");
		camtelFromMap.put("22271","5000");
		camtelFromMap.put("22280","1000");
		camtelFromMap.put("22281","2000");
		camtelFromMap.put("22282","3000");
		camtelFromMap.put("22283","5000");
		camtelFromMap.put("22284","6600");
		camtelFromMap.put("22285","8000");
		camtelFromMap.put("22290","0000");
		camtelFromMap.put("22291","4000");
		camtelFromMap.put("22292","5000");
		camtelFromMap.put("22293","6000");
		camtelFromMap.put("22294","7000");
		camtelFromMap.put("22300","0000");
		camtelFromMap.put("22310","0000");
		camtelFromMap.put("22320","0000");
		camtelFromMap.put("22321","0500");
		camtelFromMap.put("22322","1000");
		camtelFromMap.put("22323","4000");
		camtelFromMap.put("22980","0000");
		camtelFromMap.put("22990","0000");
		camtelFromMap.put("33320","2000");
		camtelFromMap.put("33330","1000");
		camtelFromMap.put("33340","1000");
		camtelFromMap.put("33350","4000");
		camtelFromMap.put("33360","1000");
		camtelFromMap.put("33361","5000");
		camtelFromMap.put("33370","0000");
		camtelFromMap.put("33390","0000");
		camtelFromMap.put("33400","0000");
		camtelFromMap.put("33410","0000");
		camtelFromMap.put("33420","0000");
		camtelFromMap.put("33430","0000");
		camtelFromMap.put("33440","1000");
		camtelFromMap.put("33441","7000");
		camtelFromMap.put("33450","1000");
		camtelFromMap.put("33460","1000");
		camtelFromMap.put("33461","3000");
		camtelFromMap.put("33462","3500");
		camtelFromMap.put("33463","4000");
		camtelFromMap.put("33470","0000");
		camtelFromMap.put("33480","1000");
		camtelFromMap.put("33481","2000");
		camtelFromMap.put("33482","4000");
		camtelFromMap.put("33483","5000");
		camtelFromMap.put("33484","6000");
		camtelFromMap.put("33490","0000");
		camtelFromMap.put("33980","0000");
		camtelFromMap.put("33990","0000");
		
		
		
		
		camtelToMap.put("22200","9999");
		camtelToMap.put("22210","9999");
		camtelToMap.put("22220","9999");
		camtelToMap.put("22230","9999");
		camtelToMap.put("22240","2999");
		camtelToMap.put("22241","5099");
		camtelToMap.put("22250","3999");
		camtelToMap.put("22251","7999");
		camtelToMap.put("22252","7999");
		camtelToMap.put("22253","9999");
		camtelToMap.put("22260","1799");
		camtelToMap.put("22261","2599");
		camtelToMap.put("22262","5299");
		camtelToMap.put("22270","4999");
		camtelToMap.put("22271","7199");
		camtelToMap.put("22280","1799");
		camtelToMap.put("22281","2499");
		camtelToMap.put("22282","4999");
		camtelToMap.put("22283","5999");
		camtelToMap.put("22284","6699");
		camtelToMap.put("22285","9599");
		camtelToMap.put("22290","3999");
		camtelToMap.put("22291","4999");
		camtelToMap.put("22292","5999");
		camtelToMap.put("22293","6999");
		camtelToMap.put("22294","7199");
		camtelToMap.put("22300","9999");
		camtelToMap.put("22310","9999");
		camtelToMap.put("22320","2599");
		camtelToMap.put("22321","1999");
		camtelToMap.put("22322","1599");
		camtelToMap.put("22323","4299");
		camtelToMap.put("22980","9999");
		camtelToMap.put("22990","9999");
		camtelToMap.put("33320","9999");
		camtelToMap.put("33330","6299");
		camtelToMap.put("33340","1499");
		camtelToMap.put("33350","5499");
		camtelToMap.put("33360","8099");
		camtelToMap.put("33361","5099");
		camtelToMap.put("33370","9999");
		camtelToMap.put("33390","9999");
		camtelToMap.put("33400","9999");
		camtelToMap.put("33410","9999");
		camtelToMap.put("33420","9999");
		camtelToMap.put("33430","9999");
		camtelToMap.put("33440","8799");
		camtelToMap.put("33441","7399");
		camtelToMap.put("33450","2199");
		camtelToMap.put("33460","2999");
		camtelToMap.put("33461","3999");
		camtelToMap.put("33462","3599");
		camtelToMap.put("33463","4999");
		camtelToMap.put("33470","9999");
		camtelToMap.put("33480","1999");
		camtelToMap.put("33481","3999");
		camtelToMap.put("33482","4999");
		camtelToMap.put("33483","5999");
		camtelToMap.put("33484","7199");
		camtelToMap.put("33490","6999");
		camtelToMap.put("33980","9999");
		camtelToMap.put("33990","9999");
						
						
						
		camtelNewMap.put("22200","22220");
		camtelNewMap.put("22210","22221");
		camtelNewMap.put("22220","22222");
		camtelNewMap.put("22230","22223");
		camtelNewMap.put("22240","22224");
		camtelNewMap.put("22241","22233");
		camtelNewMap.put("22250","22225");
		camtelNewMap.put("22251","22235");
		camtelNewMap.put("22252","22234");
		camtelNewMap.put("22253","22236");
		camtelNewMap.put("22260","22237");
		camtelNewMap.put("22261","22226");
		camtelNewMap.put("22262","22219");
		camtelNewMap.put("22270","22227");
		camtelNewMap.put("22271","22239");
		camtelNewMap.put("22280","22211");
		camtelNewMap.put("22281","22248");
		camtelNewMap.put("22282","22228");
		camtelNewMap.put("22283","22217");
		camtelNewMap.put("22284","22213");
		camtelNewMap.put("22285","22247");
		camtelNewMap.put("22290","22229");
		camtelNewMap.put("22291","22241");
		camtelNewMap.put("22292","22245");
		camtelNewMap.put("22293","22242");
		camtelNewMap.put("22294","22244");
		camtelNewMap.put("22300","22230");
		camtelNewMap.put("22310","22231");
		camtelNewMap.put("22320","22218");
		camtelNewMap.put("22321","22212");
		camtelNewMap.put("22322","22232");
		camtelNewMap.put("22323","22214");
		camtelNewMap.put("22980","22298");
		camtelNewMap.put("22990","22299");
		camtelNewMap.put("33320","23332");
		camtelNewMap.put("33330","23333");
		camtelNewMap.put("33340","23334");
		camtelNewMap.put("33350","23335");
		camtelNewMap.put("33360","23336");
		camtelNewMap.put("33361","23321");
		camtelNewMap.put("33370","23337");
		camtelNewMap.put("33390","23339");
		camtelNewMap.put("33400","23340");
		camtelNewMap.put("33410","23341");
		camtelNewMap.put("33420","23342");
		camtelNewMap.put("33430","23343");
		camtelNewMap.put("33440","23344");
		camtelNewMap.put("33441","23327");
		camtelNewMap.put("33450","23345");
		camtelNewMap.put("33460","22246");
		camtelNewMap.put("33461","23331");
		camtelNewMap.put("33462","23320");
		camtelNewMap.put("33463","23346");
		camtelNewMap.put("33470","23347");
		camtelNewMap.put("33480","23322");
		camtelNewMap.put("33481","23326");
		camtelNewMap.put("33482","23348");
		camtelNewMap.put("33483","23330");
		camtelNewMap.put("33484","23329");
		camtelNewMap.put("33490","23349");
		camtelNewMap.put("33980","23398");
		camtelNewMap.put("33990","23399");
					


		camtelRollBackMap.put("22220","2220");
		camtelRollBackMap.put("22221","2221");
		camtelRollBackMap.put("22222","2222");
		camtelRollBackMap.put("22223","2223");
		camtelRollBackMap.put("22224","2224");
		camtelRollBackMap.put("22233","2224");
		camtelRollBackMap.put("22225","2225");
		camtelRollBackMap.put("22235","2225");
		camtelRollBackMap.put("22234","2225");
		camtelRollBackMap.put("22236","2225");
		camtelRollBackMap.put("22237","2226");
		camtelRollBackMap.put("22226","2226");
		camtelRollBackMap.put("22219","2226");
		camtelRollBackMap.put("22227","2227");
		camtelRollBackMap.put("22239","2227");
		camtelRollBackMap.put("22211","2228");
		camtelRollBackMap.put("22248","2228");
		camtelRollBackMap.put("22228","2228");
		camtelRollBackMap.put("22217","2228");
		camtelRollBackMap.put("22213","2228");
		camtelRollBackMap.put("22247","2228");
		camtelRollBackMap.put("22229","2229");
		camtelRollBackMap.put("22241","2229");
		camtelRollBackMap.put("22245","2229");
		camtelRollBackMap.put("22242","2229");
		camtelRollBackMap.put("22244","2229");
		camtelRollBackMap.put("22230","2230");
		camtelRollBackMap.put("22231","2231");
		camtelRollBackMap.put("22218","2232");
		camtelRollBackMap.put("22212","2232");
		camtelRollBackMap.put("22232","2232");
		camtelRollBackMap.put("22214","2232");
		camtelRollBackMap.put("22298","2298");
		camtelRollBackMap.put("22299","2299");
		camtelRollBackMap.put("23332","3332");
		camtelRollBackMap.put("23333","3333");
		camtelRollBackMap.put("23334","3334");
		camtelRollBackMap.put("23335","3335");
		camtelRollBackMap.put("23336","3336");
		camtelRollBackMap.put("23321","3336");
		camtelRollBackMap.put("23337","3337");
		camtelRollBackMap.put("23339","3339");
		camtelRollBackMap.put("23340","3340");
		camtelRollBackMap.put("23341","3341");
		camtelRollBackMap.put("23342","3342");
		camtelRollBackMap.put("23343","3343");
		camtelRollBackMap.put("23344","3344");
		camtelRollBackMap.put("23327","3344");
		camtelRollBackMap.put("23345","3345");
		camtelRollBackMap.put("22246","3346");
		camtelRollBackMap.put("23331","3346");
		camtelRollBackMap.put("23320","3346");
		camtelRollBackMap.put("23346","3346");
		camtelRollBackMap.put("23347","3347");
		camtelRollBackMap.put("23322","3348");
		camtelRollBackMap.put("23326","3348");
		camtelRollBackMap.put("23348","3348");
		camtelRollBackMap.put("23330","3348");
		camtelRollBackMap.put("23329","3348");
		camtelRollBackMap.put("23349","3349");
		camtelRollBackMap.put("23398","3398");
		camtelRollBackMap.put("23399","3399");

	}

}
